import java.util.HashSet;
import java.util.Random;
import java.util.Set;
public class Computer {
    static Set<String> set = new HashSet<>();
    public static Random random = new Random();

    public Computer(Object num1, Object num2) {


    }
    public static void main(String[] args){
        opreate(random,50);
    }
    public static int add(Object x,Object y){
        if(x instanceof Integer || y instanceof Integer){
            int num1 = Integer.parseInt(x.toString());
            int num2 = Integer.parseInt(x.toString());
            if (num1 < 0 || num2 < 0 || num1 >100 || num2 > 100){
                return -1;
            }else{
                int result = num1 + num2;
                if (result < 100 && result > 0){
                    String str = num1 + "+" + num2 + "=" + result;
                    set.add(str);
                    return 0;
                }else{
                    return -1;
                }
            }
        }
        else return -1;
    }

    public static int reduce(Object x,Object y) {
        if(x instanceof Integer || y instanceof Integer){
            int num1 = Integer.parseInt(x.toString());
            int num2 = Integer.parseInt(y.toString());
            if (num1 < num2) {
                return -1;
            } else if (num1 < 0 || num2 < 0 || num1 > 100) {
                return -1;
            } else {
                int result = num1 - num2;
                if (result < 100 && result > 0) {
                    String str = num1 + "-" + num2 + "=" + result;
                    set.add(str);
                    return 0;
                } else {
                    return -1;
                }
            }
        }
        else return -1;
    }

    public static void opreate(Random random,int number){
        int count = 0;
        while (set.size() < number){
            Integer num1 = random.nextInt(100) + 1;
            Integer num2 = random.nextInt(100) + 1;
            int flag = random.nextInt(2);
            if (flag == 0){
                reduce(num1,num2);
            }else{
                add(num1,num2);
            }
        }
        for (String list : set){
            count++;
            System.out.printf("%-8s\t",list);
            if (count % 6 == 0)System.out.println();
        }
    }
}